Skip to content

Added project_name optional field to user mappings ui (#9)#3743

Draft
satyamMIPL wants to merge 3 commits intosegmentio:mainfrom
moengage:main
Draft

Added project_name optional field to user mappings ui (#9)#3743
satyamMIPL wants to merge 3 commits intosegmentio:mainfrom
moengage:main

Conversation

@satyamMIPL
Copy link
Copy Markdown

A summary of your pull request, including the what change you're making and why.

We have added a new field called project_name in the user mappings to support multiple projects in a single workspace.

  • Once user provides this field some string value its should be mapped as moe_project_name in the resulting payload.
  • If there is no value provided to this field then resulting payload will not have moe_project_name field at all.
  • This is an optional field

Testing

Include any additional information about the testing you have completed to
ensure your changes behave as expected. For a speedy review, please check
any of the tasks you completed below during your testing.

  • Added unit tests for new functionality
  • Tested end-to-end using the local server
  • [If destination is already live] Tested for backward compatibility of destination. Note: New required fields are a breaking change.
  • [Segmenters] Tested in the staging environment
  • [Segmenters] [If applicable for this change] Tested for regression with Hadron.

Security Review

Please ensure sensitive data is properly protected in your integration.

  • Reviewed all field definitions for sensitive data (API keys, tokens, passwords, client secrets) and confirmed they use type: 'password'

New Destination Checklist

  • Extracted all action API versions to verioning-info.ts file. example

* fix: added project name to user mappings ui

* fix: adding null check for properties in payload

* fix: mapping moe field with project name

* fix: test cases
Comment thread packages/destination-actions/src/destinations/moengage/trackEvent/index.ts Outdated
@joe-ayoub-segment
Copy link
Copy Markdown
Contributor

Looks good to me @satyamMIPL .
I've requested an AI review as well. Can you take respond / resolve any comments it throws up please?
Best regards,
Joe

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for an optional project_name mapping in the MoEngage trackEvent action so that (when provided) it is emitted as moe_project_name in the outbound event properties.

Changes:

  • Introduces a new optional project_name action field and maps it to properties.moe_project_name.
  • Updates request construction to incorporate moe_project_name into properties.
  • Expands unit tests and updates snapshots to cover the new field behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/destination-actions/src/destinations/moengage/trackEvent/index.ts Adds project_name field and injects moe_project_name into outbound properties.
packages/destination-actions/src/destinations/moengage/trackEvent/generated-types.ts Updates generated payload typing to include project_name.
packages/destination-actions/src/destinations/moengage/trackEvent/tests/index.test.ts Adds unit tests validating moe_project_name injection behavior.
packages/destination-actions/src/destinations/moengage/trackEvent/tests/snapshots/snapshot.test.ts.snap Updates action snapshots for required/all-fields cases.
packages/destination-actions/src/destinations/moengage/tests/snapshots/snapshot.test.ts.snap Updates destination-level snapshots impacted by the action payload shape.

Comment thread packages/destination-actions/src/destinations/moengage/trackEvent/index.ts Outdated
@satyamMIPL
Copy link
Copy Markdown
Author

Hi @joe-ayoub-segment, we will be releasing this next week after few changes are confirmed on our end. Moving this PR to draft.

@joe-ayoub-segment
Copy link
Copy Markdown
Contributor

Hi @joe-ayoub-segment, we will be releasing this next week after few changes are confirmed on our end. Moving this PR to draft.

OK thanks @satyamMIPL I've removed it from the deploy tomorrow. Let me know when you want this to go out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants